core: Fix crasher in "rev-parse"
authorColin Walters <walters@verbum.org>
Thu, 8 Mar 2012 13:41:01 +0000 (08:41 -0500)
committerColin Walters <walters@verbum.org>
Thu, 8 Mar 2012 17:10:58 +0000 (12:10 -0500)
src/ostree/ot-builtin-rev-parse.c

index 5d4bf73c98f1c7c7cca6fd4599811e80652fb8a3..84273863430e6bc2cde2c2d8c7d4116b627453a3 100644 (file)
@@ -62,6 +62,7 @@ ostree_builtin_rev_parse (int argc, char **argv, GFile *repo_path, GError **erro
     {
       rev = argv[i];
       g_free (resolved_rev);
+      resolved_rev = NULL;
       if (!ostree_repo_resolve_rev (repo, rev, FALSE, &resolved_rev, error))
         goto out;
       g_print ("%s\n", resolved_rev);